import java.util.Iterator;




public class Eight {

	public static void main(String[] args) {
		 Integer[] list=new Integer[5];
	      list[0]=4654;
	      list[1]=6;
	      list[2]=97987;
	      list[3]=3;
	      list[4]=6;//这里打乱顺序定义了一个数组，然后传进去实现排序的顺序表里面
	      SinglyLinkedList<Integer> a=new SinglyLinkedList<Integer>(list);
	      SinglyLinkedList<Integer> b=new SinglyLinkedList<Integer>(list);
	      Iterator2<Integer> it=a.iterator();
		   
			while(it.hasNext()) {
				int c=it.next();
				System.out.print(c+" ");
				if(c==4654) {
					it.remove();
				
				}
	            
			}
			System.out.println();
			a.showList();
			System.out.println();
			System.out.println(it.indexOf(6));
			System.out.println(a.iterator().equals2(b));
			
			
			
		   
	}

}
